/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.cspimp.esrz.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseCspImpEntity;

import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://docs.auauz.net
* @description /
* @author 黄星星
* @date 2020-06-26
**/
@Entity
@Data
@Table(name="esrz_scl")
public class Scl extends BaseCspImpEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键")
    private Long id;

    @Column(name = "cid")
    @ApiModelProperty(value = "所属公司")
    private Long cid;

    @Column(name = "pid")
    @ApiModelProperty(value = "所属项目")
    private Long pid;

    @Column(name = "equip_name")
    @ApiModelProperty(value = "设备名称")
    private String equipName;

    @Column(name = "risk_area_id")
    @ApiModelProperty(value = "风险区域主键")
    private Long riskAreaId;

    @Column(name = "risk_area_name")
    @ApiModelProperty(value = "风险区域姓名")
    private String riskAreaName;

    @Column(name = "jcx_number")
    @ApiModelProperty(value = "检查项数量")
    private String jcxNumber;

    @Column(name = "scl_risk_level_id")
    @ApiModelProperty(value = "风险等级主键")
    private Long sclRiskLevelId;

    @Column(name = "scl_risk_level_code")
    @ApiModelProperty(value = "风险等级code")
    private String sclRiskLevelCode;

    @Column(name = "scl_risk_level_name")
    @ApiModelProperty(value = "风险等级名称")
    private String sclRiskLevelName;

    public void copy(Scl source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}